import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'LoginPage',
    component: () => import('../views/LoginPage.vue')
  },

  {
    path: '/Main',
    name: '首页',
    component: Home
  },
  {
    path:'/Register',
    name:'Register',
    component: ()=> import('../views/Register.vue')
  },
  {
    path:'/Info',
    name:'Info',
    component: ()=>import('../views/Info.vue')
  },
  {
    path: '/coursesManage',
    name: '我的课程',
    component: () => import('../views/teacherClass.vue')
  },
  {
    path: '/courseChoosing',
    name: '管理课程',
    component: () => import('../views/CourseChoosing.vue')
  },
  {
    path: '/myCourse',
    name: '学生个人课程',
    component: () => import('../views/Mycourse.vue')
  },
  {
    path: '/gradesOperate',
    name: '成绩管理',
    component: () => import('../views/gradesOperate.vue')
  },
  {
    path: '/gradesBrowser',
    name: '查看成绩',
    component: () => import('../views/gradesBrowser.vue')
  },
  {
    path: '/gradesBrowserTeacher',
    name: '查看成绩',
    component: () => import('../views/gradeBrowserTeacher.vue')
  },
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
